/*
 * clog_spec.h
 *
 *  Created on: 2012-8-23
 *      Author: lin
 */

#ifndef CLOG_SPEC_H_
#define CLOG_SPEC_H_

#include "def/defs.h"
#include "clog_event.h"

typedef struct{
    uint16_t write_op;
    uint32_t strlen;
    char str[0];
}clog_spec_t;


clog_spec_t *clog_spec_new(const char *pattern_start, char **pattern_next);
void clog_spec_free(clog_spec_t *spec);
int clog_spec_write(clog_event_t *event,char *buf,int32_t buflen);
#endif /* CLOG_SPEC_H_ */
